package my.cn.bdqn.life.net;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.message.BasicNameValuePair;
public class URLParam {
	public static HttpPost createURL(Map<String,String>map){
		HttpPost request=new HttpPost("http://118.186.211.92:8080/LeisureLifeServer/dealcmd");
		try{		
		List<NameValuePair>params=
			new ArrayList<NameValuePair>();
		Set<String> keys=map.keySet();
		for(String s:keys){
			params.add(new BasicNameValuePair(s,map.get(s)));
		}		
		request.setEntity(new UrlEncodedFormEntity(params));
		}catch(Exception e){}
		return request;
	}

}
